// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from "axios";
import 'lib-flexible/flexible'
import Vant from 'vant';
import 'vant/lib/index.css';
import {api} from './assets/js/ajax'
import iconfont from './assets/fonts/iconfont.css'
import dayjs from 'dayjs'
import moment from 'moment'
import store from './store'

Vue.prototype.$store = store
Vue.prototype.$moment = 'moment'
Vue.config.productionTip = false
Vue.prototype.$http = api
Vue.prototype.dayjs = dayjs;
Vue.use(Vant)
Vue.filter('moment', function (value, formatString) {
  formatString = formatString || 'YYYY-MM-DD hh:mm:ss';
  return moment(value).format(formatString); // value可以是普通日期 20170723
  // return moment.unix(value).format(formatString); // 这是时间戳转时间
// return  moment(value).format("YYYY-MM-DD hh:mm:ss");

//2017-10-17 06:08:40
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
